package com.jt.demo7;

public class Person {
    private Integer id;
    private  String name;

    private Car car;

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public void sayhi(){
        System.out.println(id+":"+name);
    }
    public void togo(){
        car.go();
    }
}
